{% extends 'seller/base.html' %}
{% block main %}
    <!--面板部分-->
    <form action="/seller/store/" method="post" enctype="multipart/form-data">
        {% csrf_token %}
        <input type="hidden" name="id" value="{{ store.id }}">
        <div class="container-fluid">
            <div class="card shadow mb-4">
                <div class="card-header py-3">
                    <h4 class="m-0 font-weight-bold text-primary">店铺详情</h4>
                </div>
                <div class="card-body">
                    <table class="table store_table">
                        <tr>
                            <td rowspan="4">
                                <a href="#" class="thumbnail">
                                    {% if store %}
                                        <img src="/static/{{ store.logo }}" width="200px" height="200px">
                                    {% else %}
                                        <img src="/static/seller/img/by.jpg" width="200px" height="200px">
                                    {% endif %}
                                </a>
                            </td>
                            <th class="t_label">店铺名称</th>
                            <td class="t_input"><input class="form-control" type="text" name="shopname"
                                                       placeholder="店铺名称" value="{{ store.name }}"></td>
                            <td class="t_message">店铺名称每月至多修改一次</td>

                        </tr>
                        <tr>
                            <th class="t_label">店铺地址</th>
                            <td class="t_input" colspan="2">
                                <input class="form-control" type="text" name="shopaddress"
                                       placeholder="店铺地址" value="{{ store.address }}"/>
                            </td>
                        </tr>
                        <tr>
                            <th colspan="3">店铺描述</th>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <textarea class="form-control" name="shopdesc">{{ store.desc }}</textarea>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input class="btn btn-primary" type="file" name="shopimg" value="图片上传">
                            </td>
                            <td colspan="3">
                                <input class="btn btn-primary" type="submit" value="发起修改">
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </form>
    <!-- End of Main Content -->
{% endblock %}